///:Demo7.java
package com.cqgcxy.stranger.case7;

import com.cqgcxy.stranger.domain.User;

import java.util.ArrayList;
import java.util.List;

/**
 * @author icechen1219
 * @date 2018/11/20
 */
public class Demo7 {
    private static final int COUNT = 200 * 10000;

    public static void testDefault(List<User> list) {
        long begin = System.currentTimeMillis();

        for (int i = 0; i < COUNT; i++) {
            list.add(User.createUser(i));
        }

        long end = System.currentTimeMillis();
        System.out.println((end - begin) + " 毫秒");
    }


    public static void main(String[] args) {
        testDefault(new ArrayList<>());
        testDefault(new ArrayList<>(COUNT));
    }
}
///:Demo7.java
